package com.dstz.bpm.api.engine.constant;

public enum LogicType {
   AND("and", "与"),
   OR("or", "或"),
   EXCLUDE("exclude", "非");

   private String key = "";
   private String value = "";

   private LogicType(String key, String value) {
      this.key = key;
      this.value = value;
   }

   public String getKey() {
      return this.key;
   }

   public void setKey(String key) {
      this.key = key;
   }

   public String getValue() {
      return this.value;
   }

   public void setValue(String value) {
      this.value = value;
   }

   public String toString() {
      return this.key;
   }

   public static LogicType fromKey(String key) {
      LogicType[] var1 = values();
      int var2 = var1.length;

      for(int var3 = 0; var3 < var2; ++var3) {
         LogicType c = var1[var3];
         if (c.getKey().equalsIgnoreCase(key)) {
            return c;
         }
      }

      throw new IllegalArgumentException(key);
   }
}
